export const mixins = {
	data() {
		return {};
	},
	computed: {},
	created() {},
	mounted() {},

	methods: {
		navto(url) {
			uni.navigateTo({
				url
			})
		},
		back(){
			uni.navigateBack()
		},
		preview(urls,current) {
			uni.previewImage({
				urls,
				current
			});
		},
	},
	computed: {
		URL() {
			return (url) => {
				// if (!url) return require('@/static/logo.png')
				if (url && (url.includes(',') && !url.includes('base64'))) url = url.split(',')[0]
				return url ? ((url.includes('http') || url.includes('data:')) ? url : this.$store.state
					.IMAGE_URL + url) : ''
			}
		},
	}
};